<!Doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <title>hitTest</title>
    <style>
        body{
            margin:0;
        }
        .movieclip{
            position: absolute;
            left:0;
            top:0;
            right:0;
            bottom: 0;
        }
    </style>
</head>

<body>

<canvas id="canvas-shape" class="movieclip"></canvas>

<!-- build:js scripts/libs/easyrender.js -->
<script src="scripts/Base.js"></script>
<script src="scripts/ES6-promise.pollyfill.js"></script>
<script src="scripts/Utils.js"></script>
<script src="scripts/Event.js"></script>
<script src="scripts/Loader.js"></script>
<script src="scripts/RequestAnimationFrame.js"></script>
<script src="scripts/Ticker.js"></script>
<script src="scripts/Timer.js"></script>
<script src="scripts/Easing.js"></script>
<script src="scripts/Tween.js"></script>
<script src="scripts/Renderer.js"></script>
<script src="scripts/MovieClip.js"></script>
<script src="scripts/TouchEvent.js"></script>
<script src="scripts/Stats.js"></script>
<!-- endbuild -->

<script>
    var canvas = document.getElementById('canvas-shape');
    var stage = new EC.Stage(canvas, {
        scaleMode: EC.isTouch ? 'showAll' : 'noScale',
        width: 750,
        height: 1334,
        showFps: true
    });

    stage.showFps({
        right: 0,
        left: "auto",
        top: 0
    });

    var rect = new EC.Shape();
    rect.stroke("#f90");
    rect.rect(200, 50, 200, 100);
    stage.addChild(rect);

    var rect2 = new EC.Shape();
    rect2.stroke("#cc0000");
    rect2.rect(120, 120, 100, 100);
    stage.addChild(rect2);

    var rect3 = new EC.Shape();
    rect3.stroke("#000");
    rect3.rect(150, 250, 150, 100);
    stage.addChild(rect3);

    console.log(EC.Util.hitTest(rect, rect2));
    console.log(EC.Util.hitTest(rect2, rect3));
</script>
</body>
</html>